package com.common.enums;

public enum BandEnum {
    UNBAND("0","未绑定"),
    BANDED("1","已绑定"),
    DELBAND("2","已解除绑定"),
    AGAINBAND("3","已再次绑定"),
    CHACKMSG("5","验证信息错误"),
    SIGNFAIL("6","登录失败"),
    SIGNSUCCESS("7","登录成功"),
    PAYFAIL("-1","支付失败"),
    BINDSUCCESS("000","成功"),
    BINDFAIL("001","失败"),
    BINDNOTFUND("002","没有找到对应设备"),
    PARAMSNOTFUND("003","参数缺失"),
    SYSTEMFAIL("999","系统异常"),
    ;
    public String code;
    public String message;
    BandEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static BandEnum getBandType(String value) {
        for (BandEnum bandEnum : BandEnum.values()) {
            if (value.equals(bandEnum.getCode())) {
                return bandEnum;
            }
        }
        return null;
    }
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

}
